int findMaxConsecutiveOnes(int* nums, int numsSize) {
    int max = 0;
    int temp = 0;
    for (int i = 0; i < numsSize; i++)
    {
        if (1 == nums[i])
        {
            temp++;
            if (max < temp)
            {
                max = temp;
            }
        }
        else
            temp = 0;
    }
    return max;
}